import { ApiPropertyOptional } from "@nestjs/swagger"
import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"

@Entity("test_user")
export class UserEntity {

    @PrimaryGeneratedColumn()
    id: string


    @ApiPropertyOptional({ description: '用户姓名' })
    @Column({
        type: 'varchar',
        nullable: false,
        length: 128,
        name: 'firstName',
        comment: '用户姓名',
    })
    firstName: string

    @Column({
      type: 'varchar',
      nullable: false,
      length: 128,
      name: 'lastName',
      comment: '用户名字',
    })
    lastName: string

    @Column({
      type: 'boolean',
      nullable: false,
      length: 0,
      name: 'isActive',
      comment: '是否激活',
    })
    isActive: boolean

}
